import request from '@/utils/request'

// 查询公文发文列表
export function listOfficalDoc(query) {
  return request({
    url: '/oa/officalDoc/list',
    method: 'get',
    params: query
  })
}


// 查询公文收文
export function receiveList(query) {
    return request({
        url: '/oa/officalDoc/receiveList',
        method: 'get',
        params: query
    })
}

// 查询公文发文详细
export function getOfficalDoc(id) {
  return request({
    url: '/oa/officalDoc/' + id,
    method: 'get'
  })
}

// 新增公文发文
export function addOfficalDoc(data) {
  return request({
    url: '/oa/officalDoc',
    method: 'post',
    data: data
  })
}

// 修改公文发文
export function updateOfficalDoc(data) {
  return request({
    url: '/oa/officalDoc',
    method: 'put',
    data: data
  })
}

// 删除公文发文
export function delOfficalDoc(id) {
  return request({
    url: '/oa/officalDoc/' + id,
    method: 'delete'
  })
}

export function sealDoc(id){
    return request({
        url: '/oa/officalDoc/sealDoc/'+id,
        method: 'post'
    })
}

